﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmProyectoRecetaLista.aspx.cs" Inherits="WebMenu.Pagina.Proyecto.frmProyectoRecetaLista" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <script src="../../style/script/jquery-1.11.2.js"></script>
    <script src="../../style/script/jquery-ui.js"></script>
    <link href="../../style/css/smoothness/theme.css" rel="stylesheet" />
    <link href="../../style/css/smoothness/jquery-ui.css" rel="stylesheet" />
    <style>
        .ocultar {
            display: none;
        }
     </style>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <Triggers>

            <asp:AsyncPostBackTrigger ControlID="ddlDepartamento" EventName="SelectedIndexChanged" />

        </Triggers>
        <ContentTemplate>
            <table>
                <tr>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td></td>
                    <td>Deparatamento :</td>
                    <td>
                        <asp:DropDownList ID="ddlDepartamento" runat="server" OnSelectedIndexChanged="ddlDepartamento_SelectedIndexChanged" AutoPostBack="true">
                        </asp:DropDownList>
                    </td>
                    <td></td>
                    <td>Provincia :</td>
                    <td>
                        <asp:DropDownList ID="ddlProvincia" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td></td>
                    <td><%--Proyecto :--%>Cliente :</td>
                    <td>
                        <%--<asp:TextBox ID="txtProyecto" runat="server"></asp:TextBox>--%>
                        <asp:DropDownList ID="ddlCliente" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td></td>
                    <td><%--Cliente :--%>Receta :</td>
                    <td>
                        <%--<asp:TextBox ID="txtCliente" runat="server"></asp:TextBox>--%>
                        <asp:DropDownList ID="ddlReceta" runat="server" >
                        </asp:DropDownList>
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td colspan="2">
                        <asp:Button ID="btnNuevo" runat="server" Text="Nuevo" OnClick="btnNuevo_Click" />
                        <asp:Button ID="btnEditar" runat="server" Text="Editar" OnClick="btnEditar_Click" />
                        <asp:Button ID="btnEliminar" runat="server" Text="Eliminar" OnClick="btnEliminar_Click" />
                    </td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td style="text-align: right">
                        <asp:Button ID="btnBuscar" runat="server" Text="Buscar" OnClick="btnBuscar_Click" />
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td></td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td colspan="5">
                        <asp:GridView ID="gvProyecto" runat="server" AutoGenerateColumns="False">
                            <Columns>
                                <asp:TemplateField HeaderText="Selec.">
                            <ItemTemplate>
                                <asp:CheckBox ID="cbSelec" runat="server" />
                                <asp:HiddenField ID="hdIDPROYECTO" runat="server" Value='<%# Eval("ID_PROYECTO") %>' />
                                <asp:HiddenField ID="hdIDCLIENTE" runat="server" Value='<%# Eval("ID_CLIENTE") %>' />
                                <asp:HiddenField ID="hdIdReceta" runat="server" Value='<%# Eval("ID_RECETA") %>' />
                                <asp:HiddenField ID="hdEst" runat="server" Value='<%# Eval("ESTADO_PROY_REC") %>' />
                            </ItemTemplate>
                                </asp:TemplateField>                              
                                <asp:BoundField HeaderText="Cliente" DataField="NOMBRE_CLIENTE" />
                                <asp:BoundField HeaderText="Receta" DataField="NOMBRE_REC" />
                                <asp:BoundField HeaderText="Estado" DataField="DESC_EST_PROY_REC" />
                                
                                <asp:BoundField HeaderText="ID_PROYECTO" DataField="ID_PROYECTO" HeaderStyle-CssClass="ocultar" ItemStyle-CssClass="ocultar" />
                                <asp:BoundField HeaderText="ID_CLIENTE" DataField="ID_CLIENTE" HeaderStyle-CssClass="ocultar" ItemStyle-CssClass="ocultar" />
                                <asp:BoundField HeaderText="ID_RECETA" DataField="ID_RECETA" HeaderStyle-CssClass="ocultar" ItemStyle-CssClass="ocultar" />
                                <asp:BoundField HeaderText="ESTADO_PROY_REC" DataField="ESTADO_PROY_REC" HeaderStyle-CssClass="ocultar" ItemStyle-CssClass="ocultar" />
                            </Columns>
                        </asp:GridView>
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
